<html>
<head>
<meta charset="UTF-8">
<title>系统部署信息修改</title>
	<link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
	<script src="../../ffres/dict/all.js" type="text/javascript"></script>
	<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">系统部署信息信息</div>
		<table class="esaas-info-edit-table">
			<tr>
				<td width="15%" align="right">应用部署标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" readOnly
					name="appDeployId" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">应用标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appId" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">应用名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appName" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">应用中文名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appCnname" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">应用版本：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appVersion" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">应用类型：</td>
				<td width="35%"><select class="easyui-combobox"
					id="appType" name="appType"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:APP_TYPE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">应用排列顺序：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appOrder" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">ecs标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="ecsId" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">服务器IP：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="ecsIp" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">所属系统：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="subsCode" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">服务器名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="ecsName" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">所在位置：</td>
				<td width="35%"><select class="easyui-combobox"
					id="ecsRegion" name="ecsRegion"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:ECS_REGION">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">应用部署目录：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appDeployPath" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">应用日志目录：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appLogPath" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">应用端口：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="appPort" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">应用状态：</td>
				<td width="35%"><select class="easyui-combobox"
					id="appState" name="appState"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:APP_STATE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">操作时间：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="operTime" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">操作人：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="operUserid" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
		</table>
	</form>
	<div style="text-align: center; padding: 15px">
		<a href="javascript:void(0)" class="easyui-linkbutton"
			onclick="submitForm()">&nbsp;保&nbsp;存&nbsp;</a> <a
			href="javascript:void(0)" class="easyui-linkbutton"
			onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>		
		$(function() {
			var appDeployId = $.getUrlParam('appDeployId');
			$.restfulGet('../../api/sys/deploy/info/' + appDeployId,null,function(data){
					$('#ff').form('load', {
						appDeployId : data.rows.appDeployId,
						appId : data.rows.appId,
						appName : data.rows.appName,
						appCnname : data.rows.appCnname,
						appVersion : data.rows.appVersion,
						appType : data.rows.appType,
						appOrder : data.rows.appOrder,
						ecsId : data.rows.ecsId,
						ecsIp : data.rows.ecsIp,
						subsCode : data.rows.subsCode,
						ecsName : data.rows.ecsName,
						ecsRegion : data.rows.ecsRegion,
						appDeployPath : data.rows.appDeployPath,
						appLogPath : data.rows.appLogPath,
						appPort : data.rows.appPort,
						appState : data.rows.appState,
						operTime : data.rows.operTime,
						operUserid : data.rows.operUserid
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/sys/deploy/info', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
